<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/WEB-INF/jspf/links.jspf"%>
<script src="${pageContext.request.contextPath}/resources/js/addUser.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><spring:message code="company.admin.new.user" /></title>
</head>
<body>
	<div id="wrapper">
		<!-- header -->
		<div id="header">
			<%@ include file="/WEB-INF/jspf/header.jspf"%>
		</div>

		<!-- top menu -->
		<div id="menu">
			<%@ include file="/WEB-INF/jspf/menu.jspf"%>
		</div>

		<!-- bodywrap -->
		<div id="bodytop">&nbsp;</div>

		<div id="bodywrap">

			<div class="errors">
				<span id="username-required-error"><spring:message
						code="company.registration.valid.required.username" /></span> <span
					id="username-short-error"><spring:message
						code="company.registration.valid.login.short" /></span> <span
					id="email-required-error"><spring:message
						code="company.registration.valid.required.email" /></span> <span
					id="email-wrong-error"><spring:message
						code="company.registration.valid.wrong.email" /></span> <span
					id="password-required-error"><spring:message
						code="company.registration.valid.required.password" /></span> <span
					id="password-short-error"><spring:message
						code="company.registration.valid.password.short" /></span> <span
					id="password-match-error"><spring:message
						code="company.registration.valid.passwords.do.not.match" /></span>
			</div>

			<div id="contentbody">

				<img
					src="${pageContext.request.contextPath}/resources/images/loading.gif"
					id="load" />

				<p>
					<spring:message code="company.admin.new.user" />
				</p>
				<hr>
				<form:form id="login-content" modelAttribute="user">
					<div class="error" id="form-error"></div>
					<span id="seccess"> <spring:message
							code="company.admin.user.added.success" />
					</span>
					<div class="fields">
						<form:label path="username">
							<spring:message code="company.login.login" />
						</form:label>
					</div>
					<div>
						<spring:message code="company.login.login" var="login" />
						<form:input path="username" type="text" placeholder="${login}"
							required="true" />
						<form:errors path="username" cssClass="error" />
					</div>
					<div id="login-error" class="error"></div>
					<div class="fields">
						<form:label path="email">Email</form:label>
					</div>
					<div>
						<form:input path="email" type="text" placeholder="Email"
							required="true" />
						<form:errors path="email" cssClass="error" />
					</div>
					<div id="email-error" class="error"></div>
					<div class="fields">
						<form:label path="password">
							<spring:message code="company.login.password" />
						</form:label>
					</div>
					<div>
						<spring:message code="company.login.password" var="pass" />
						<form:input type="password" path="password" placeholder="${pass}"
							required="true" />
						<form:errors path="password" cssClass="error" />
					</div>
					<div class="fields">
						<label for="conf-password"><spring:message
								code="company.login.confirm.password" /></label>
					</div>
					<div>
						<input type="password" id="conf-password" name="conf-password"
							placeholder="<spring:message code="company.login.password" />">
					</div>
					<div id="password-error" class="error"></div>
					<div class="fields">
						<form:label path="" id="role">
							<spring:message code="company.roles.role" />
						</form:label>
					</div>
					<div>
						<form:select path="" id="role" name="role">
							<form:options items="${roleList}" />
						</form:select>
					</div>
					<br>
					<input id="submit" type="button"
						value="<spring:message code="company.admin.add.user" />" />
				</form:form>
			</div>

		</div>
		<div id="bodybottom">&nbsp;</div>
		<div id="footer">
			<%@ include file="/WEB-INF/jspf/footer.jspf"%>
		</div>
		<div id="sidemenu">
			<div id="smtop">&nbsp;</div>
			<div id="smtitle">
				<h1>
					<spring:message code="company.menu" />
				</h1>
			</div>
			<ul class="normal">
				<li><a href="${pageContext.request.contextPath}/pages/routes"><spring:message
							code="company.menu.search" /></a></li>
				<li><a href="${pageContext.request.contextPath}/pages/cities"><spring:message
							code="company.menu.cities" /></a></li>
				<li><a href="${pageContext.request.contextPath}/pages/about"><spring:message
							code="company.menu.about" /></a></li>
			</ul>
			<div id="smtitle">
				<h1>
					<spring:message code="company.admin" />
				</h1>
			</div>
			<ul class="normal">
				<li><a href="${pageContext.request.contextPath}/pages/users"><spring:message
							code="company.admin.users" /></a></li>
				<li><a href="${pageContext.request.contextPath}/pages/addUser"
					class="currentpage"><spring:message
							code="company.admin.add.user" /></a></li>
			</ul>
			<div id="smbottom">&nbsp;</div>
		</div>
		<!-- end side menu -->
	</div>
	<!-- end wrapper -->

</body>
</html>